var util = require('../../utils/util.js');
var utilMd5 = require('../../utils/md5.js');
var app = getApp();
var page = 1;
var loadingMore = false;
var hasMore = true;

Page({

   data: {

     uid:0,
     token: '',
     waithao: 0, 
     colorSet: '',

   },
   /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    hasMore = true;
    page = 1;
    this.getLoginUserInfo();

    var tc = app.get_tc();
    
    //获取颜色配置
    app.getColorSetData(function (color) {
      that.setData({
        colorSet: color
      })
    });
  },

  getLoginUserInfo: function(inviteuid){
    var that = this;
    //调用应用实例的方法获取全局数据
    app.LoginUserInfo(function (res) {
      if (res && res != -1) {
        //更新数据
        that.setData({
          tc: app.get_tc(),
          uid: res.uid,
          token: res.token
        })
      } else {
        app.reAuthorize(reGetUserInfo);
      }
    }, inviteuid);
  },
  


})